@inherits BaseComponent

@namespace FluentCMS.Web.UI.Components

@if (Visible)
{
    <li @attributes="AdditionalAttributes">
        <div class="@this.GetClasses() @(Link || !string.IsNullOrEmpty(Href) ?
        this.ClassName("BreadcrumbItemLink") :
        "")">
            @if (IconName != IconName.Default)
            {
                <Icon Class="@this.ClassName("BreadcrumbItemIcon")" Name="@IconName" />
            }
            else
            {
                <svg class="@this.ClassName("BreadcrumbItemSeparator")" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10">
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/>
                </svg>
            }
            @if (!string.IsNullOrEmpty(Href))
            {
                <a href="@Href" class="@this.ClassName("BreadcrumbItemText")">
                    @ChildContent
                </a>
            }
            else
            {
                <span class="@this.ClassName("BreadcrumbItemText")">
                    @ChildContent
                </span>
            }
        </div>
    </li>
}